package com.chat.protocol;

/**
 * 自定义协议
 * @author Chenjie
 * @Title: IMP
 * @Package com.chat.protocol
 * @Description:
 * @date 2017/12/11
 */
public enum IMP {
    SYSTEM("SYSTEM"),
    LOGIN("LOGIN"),
    LOGOUT("LOGOUT"),
    CHAT("CHAT"),
    FLOWER("FLOWER");

    private String name;

    IMP(String name) {
        this.name = name;
    }

    public static boolean isIMP(String content){
        return content.matches("^\\[(SYSTEM|LOGIN|LOGIN|CHAT)\\]");
    }

    public String getName() {
        return name;
    }


}
